<!-- sidebar -->
<aside class="sidebar">
	<span class="side-op"></span>
	<div class="block-search">
		<h2 class="title">Find Your <strong>Property</strong></h2>
		<?php get_search_form(); ?>
	</div>
	<div class="block-sideimg">
		<?php $pageid = 58 ;if(ICL_LANGUAGE_CODE == 'vi') $pageid = 76 ;?>
		<a href="<?php echo get_page_link($pageid)?>" title="<?php echo get_page($pageid)->post_title;?>">
			<img alt="<?php echo get_page($pageid)->post_title;?>" src="<?php bloginfo('template_directory')?>/images/side-ban.gif">
		</a>
	</div>
	<?php
		$taxonomies = 'building-type';
		$args  = array('hide_empty'=>false);
		$terms = get_terms( $taxonomies, $args ) ;
		foreach( $terms as $term ){
			if( $term->parent == 0 ){
				$termchildren = get_term_children( $term->term_id, $taxonomies );				
				if(count($termchildren) > 0){
					echo '<div class="block">';					
					echo '<h2 class="pro-title"><span class="head-tit"><span>'.$term->name.'</span></span></h2>';
					echo '<ul class="list-cate">';
					foreach(  $termchildren as $child ){
						$term_child = get_term_by( 'id', $child, $taxonomies );
						echo '<li><a href="'.get_term_link($term_child,$taxonomies) .'">'.$term_child->name . '</a></li>';
					}
					echo '</ul></div>';
				}
			}
		}	
	?>
	
	<div class="block">
		<h2 class="pro-title"><span class="head-tit"><span>Support</span></span></h2>
		<div class="list-cate">
			<p class="hotline">Hotline: <?php echo get_option('custom_hotline_support')?></p>
			<ul class="media">
				<li><a href="ymsgr:sendim?<?php echo get_option('custom_yahoo_support')?>" class="yahoo"><?php echo get_option('custom_yahoo_name')?></a></li>
				<li><a href="skype:<?php echo get_option('custom_skype_support')?>" class="skype"><?php echo get_option('custom_skype_name')?></a></li>
				<li><a href="<?php echo get_option('custom_face_support')?>" class="facebook off">Facebook</a></li>
			</ul>
		</div>
	</div>
</aside>